home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{7CEC81AF-2003-4F1F-8AC2-E6D1FD8B2581}#1.0#0"; "MFADERDEMO.OCX"
- Begin VB.Form frmEffects
- BorderStyle = 0 'None
- Caption = "Form1"
- ClientHeight = 7200
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 9600
- DrawWidth = 4
- ForeColor = &H00000000&
- Icon = "Effects.frx":0000
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 480
- ScaleMode = 3 'Pixel
- ScaleWidth = 640
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin MFaderDemo.MFader MFader1
- Height = 6945
- Left = 75
- TabIndex = 15
- Top = 120
- Width = 6510
- _ExtentX = 11483
- _ExtentY = 12250
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 178
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- FontName = "MS Sans Serif"
- FontSize = 8.25
- ScaleHeight = 463
- ScaleWidth = 434
- End
- Begin VB.Timer Timer1
- Interval = 100
- Left = 7455
- Top = 4890
- End
- Begin VB.TextBox Text3
- Height = 240
- Left = 8640
- TabIndex = 11
- Text = "1"
- Top = 825
- Width = 855
- End
- Begin VB.TextBox Text2
- Height = 240
- Left = 8640
- TabIndex = 9
- Text = "1"
- Top = 495
- Width = 855
- End
- Begin VB.TextBox Text1
- Height = 240
- Left = 8640
- TabIndex = 2
- Text = "1"
- Top = 165
- Width = 855
- End
- Begin VB.CommandButton cmdGo
- Caption = "&Start Wiping"
- Default = -1 'True
- Height = 495
- Left = 6705
- TabIndex = 8
- Top = 5880
- Width = 2775
- End
- Begin VB.CheckBox chkShowParentBack
- BackColor = &H00FFC0C0&
- Caption = "Show Parent Background"
- Height = 195
- Left = 6720
- TabIndex = 7
- Top = 1650
- Width = 2340
- End
- Begin VB.CheckBox chkLoop
- BackColor = &H00FFC0C0&
- Caption = "Continuous Wipping"
- Height = 195
- Left = 6720
- TabIndex = 6
- Top = 2025
- Value = 1 'Checked
- Width = 2340
- End
- Begin VB.ComboBox cmbEffects
- BeginProperty Font
- Name = "Small Fonts"
- Size = 6.75
- Charset = 178
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 285
- ItemData = "Effects.frx":030A
- Left = 6705
- List = "Effects.frx":046D
- Style = 2 'Dropdown List
- TabIndex = 5
- Top = 2565
- Width = 2805
- End
- Begin VB.CheckBox chkClear
- BackColor = &H00FFC0C0&
- Caption = "Clear Picture Before Wipping"
- Height = 195
- Left = 6720
- TabIndex = 3
- Top = 1290
- Width = 2340
- End
- Begin VB.CommandButton cmdExit
- Cancel = -1 'True
- Caption = "&Exit"
- Height = 495
- Left = 6705
- TabIndex = 0
- Top = 6600
- Width = 2775
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "MFader by : Maher Farag www.ancientsoft.com"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 178
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00000000&
- Height = 720
- Index = 0
- Left = 6570
- TabIndex = 13
- Top = 3900
- Width = 3075
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "Delay After Effect (in ms)"
- ForeColor = &H00FFFFFF&
- Height = 240
- Index = 3
- Left = 6720
- TabIndex = 12
- Top = 855
- Width = 2055
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "Draw width (1-50)"
- ForeColor = &H00FFFFFF&
- Height = 240
- Index = 2
- Left = 6720
- TabIndex = 10
- Top = 525
- Width = 1680
- End
- Begin VB.Label Label1
- BackColor = &H0000C000&
- BackStyle = 0 'Transparent
- Caption = "Effect :"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 178
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H008080FF&
- Height = 240
- Index = 1
- Left = 6720
- TabIndex = 4
- Top = 2340
- Width = 2055
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "Speed of Effect (1-50)"
- ForeColor = &H00FFFFFF&
- Height = 240
- Index = 0
- Left = 6720
- TabIndex = 1
- Top = 195
- Width = 1680
- End
- Begin VB.Label Label2
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "MFader by : Maher Farag www.ancentsoft.com"
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 178
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FFFFFF&
- Height = 720
- Index = 1
- Left = 6585
- TabIndex = 14
- Top = 3915
- Width = 3075
- End
- Attribute VB_Name = "frmEffects"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '******************************************
- '* MFader ActiveX control Ver 1.2 *
- '* Written By : Maher Fahmy Farag *
- '* *
- '* Purchase : www.ancientsoft.com *
- '* *
- '* Enjoy the 115 Fading effects *
- '******************************************
- ' Variable to hold the maximume number of pictures being loaded
- Private MaxPicNum As Long
- Private Sub chkClear_click()
- 'CLS for MFader
- MFader1.ClearBeforeFade = chkClear.Value
- End Sub
- Private Sub chkShowParentBack_Click()
- 'Simulate Transparent effect if Checked
- 'else better for SlideShow
- MFader1.ShowBackground = chkShowParentBack.Value
- End Sub
- Private Sub cmbEffects_Click()
- ' apply the selected effect from Effects ComboBox
- MFader1.Effect = cmbEffects.ListIndex
- End Sub
- Private Sub cmdGo_Click()
- Timer1.Enabled = False
- 'Ready to run
- MFader1.StopIt = False
- 'I choosed 640X480 resolution!!!!
- MFader1.Move 0, 0, 640, 480
- 'img Holds the Picture name I named 'em 1,2,3.bmp and so on
- 'just to for example
- img = 1
- MaxPicNum = 2
- 'Start SlideShow
- If Not MFader1.StopIt Then
- 'Set the Loaded picture to MFader control
- Set MFader1.Picture = LoadPicture(App.Path & "\Images\" & Trim(Str(img)) + ".bmp")
- 'Point to the next Slide (Picture)
- img = img + 1
-
- If img > MaxPicNum Then img = 1
- 'Amazing
- MFader1.Go
- End If
- 'If the user need no continuous fading then exit loop
- If Not chkLoop.Value = vbChecked Then Exit Do
- 'Give the processor time to handle other apps
- DoEvents
- End Sub
- Private Sub cmdExit_Click()
- Unload Me
- 'Good programming habit
- Set frmEffects = Nothing
- End Sub
- Private Sub Form_Activate()
- 'Sequence is the default effect
- cmbEffects.ListIndex = 0
- 'Initialize MFader properties according to on form controls
- MFader1.Effect = Sequence
- MFader1.ClearBeforeFade = chkClear.Value
- MFader1.ShowBackground = chkShowParentBack.Value
- MFader1.FadingSpeed = Text1
- MFader1.DrawWidth = Text2
- MFader1.DelayAfterEffect = Text3
- 'Set the form background (MFader Parent or container)
- frmEffects.Picture = LoadPicture(App.Path & "\Images\Back.bmp")
- End Sub
- Private Sub Text1_LostFocus()
- If Text1 > 50 Then Text1 = 50
- If Text1 < 1 Then Text1 = 1
- MFader1.FadingSpeed = Text1
- chkLoop.Value = vbUnchecked
- End Sub
- Private Sub Text2_LostFocus()
- If Text2 > 1000 Then Text2 = 1000
- If Text2 < 1 Then Text2 = 1
- MFader1.DrawWidth = Text2
- End Sub
- Private Sub Text3_LostFocus()
- 'Delay in Milliseconds SO 1000 = ONE seconds
- If Text3 > 1000000 Then Text3 = 1000000
- If Text3 < 1 Then Text3 = 1
- MFader1.DelayAfterEffect = Text3
- End Sub
- Private Sub MFader1_Click()
- 'The user need to stop the fading process
- MFader1.StopIt = True
- Timer1.Enabled = True
- 'Restore Fader control wdith & height
- 'to make other control appear
- MFader1.Width = 440
- MFader1.Height = 480
- End Sub
- Private Sub Timer1_Timer()
- Label2(0).ForeColor = RGB(Rnd(1) * 255, 0, 0)
- End Sub
-